import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {/* http://localhost:8080/#/home */
    path: '/emp',
    component: ()=>import("@/views/EmpView.vue"),
    // children:[/* http://localhost:8080/#/home/c/p1 */
    //   {
    //     path:'c/p1',
    //     component:()=>import('@/views/container/P1View.vue')
    //   },
    //   {
    //     path:'c/p2',
    //     component:()=>import('@/views/container/P2View.vue')
    //   }
    // ]
  },
  {
    path: '/login',
    component: ()=>import("@/views/LoginView.vue")
  },
  {
    path: '/404',
    component: ()=>import("@/views/NotFound.vue")
  },
  {
    path: '*',
    redirect: '/404'/* 重定向 */
  }
]

const router = new VueRouter({
  routes
})

export default router
